package controllers;

import play.*;
import play.mvc.*;

import java.util.*;

import models.*;

public class People extends Controller {

	/**
	 * with give back following info of people: 
	 * - email (no name so far)
	 */
	public static void getPeopleInfo() {
		Long id = Long.valueOf(params.get("pid"));
		
		User p = User.findById(id);
		if(p == null) {
			renderJSON("{error:\"User not found.\"}");
		} else {
			renderJSON(p, new UserSerializer());
		}
	}
    
}

